<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2023/11/17
  Time: 9:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.time.LocalDateTime" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>1.使用java代码块开发JSP应用程序，在应用程序首页显示当前时间</title>
</head>
<body>
<% LocalDateTime now = LocalDateTime.now();
%>

<div style="color: red">
    访问该页面的时间是: <%= now.getYear() + "年 " + now.getMonthValue() + "月 " + now.getDayOfMonth() + "日 "
        + now.getHour() + "时 " + now.getMinute() + "分 " + now.getSecond() + "秒" %>
</div>

</body>
</html>
